<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex</title> 
    <style>
        *{
            padding: 0;
            margin: 0;
        }
          ul{
              margin: 100px auto;
              width: 1000px;
              height: 500px;
              border: 1px solid red;
              list-style: none;
              display: flex;
              /* flex-wrap: wrap; */
              justify-content: center;
              align-items: center;
          }

          li{
              width: 120px;
              height: 120px;
              text-align: center;
              line-height:120px ;
              flex-shrink: 0;
              /* flex-grow: 1; */
            
          }

          li:nth-child(1){
              background-color: cornflowerblue;
          }

          li:nth-child(2){
              background-color: orangered;
          }

          li:nth-child(3){
              background-color: plum;
          }

          li:nth-child(4){
              background-color: tan;
          }

    </style>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
    </ul>
</body>
</html>